#pragma once
#include "Bindable.h"
#include <array>
#include <optional>


class Blender : public Bindable
{
public:
	Blender(Graphics& gfx, bool blending, std::optional<float> factor = {});
	void Bind(Graphics& gfx) override;
	void SetFactor(float factor);
	float GetFactor() const;
	static std::shared_ptr<Blender> Create(Graphics& gfx, bool blending, std::optional<float> factor = {});
protected:
	Microsoft::WRL::ComPtr<ID3D11BlendState> pBlender;
	bool blending;
	std::optional<std::array<float, 4>> factors;
};
